package band.wukong.practice.springboot.spring4.advanced.conditional;

import band.wukong.practice.springboot.spring4.ext.logback.LogbackLoader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author wukong(wukonggg@139.com)
 */
public class ShellApplication {

    private static final Logger logger = LoggerFactory.getLogger(ShellApplication.class);

    public static void main(String[] args) {
        LogbackLoader.load();

        AnnotationConfigApplicationContext context =
                new AnnotationConfigApplicationContext(ShellConfig.class);

        ShellService shell = context.getBean(ShellService.class);

        logger.info(context.getEnvironment().getProperty("os.name") + "下的列表命令为：" + shell.showCmdList());

        context.close();
    }
}
